<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{$setting.webname} - 回收信息修改</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link href="/public/static/admin/layui/css/layui.css" rel="stylesheet">
    <link href="/public/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/public/static/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/public/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/public/static/admin/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="/public/static/admin/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
    <link href="/public/static/admin/css/style.css?v=4.1.0" rel="stylesheet">


    <style>
        #demo2 img{
            height: 110px;
        }
    </style>
</head>
<body class="gray-bg">
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-4">
        <h2>回收站</h2>
        <ol class="breadcrumb">
            <li>
                <a href="{:url('Admins/admin')}">主页</a>
            </li>
            <li>
                <strong>回收信息修改</strong>
            </li>
        </ol>
    </div>
</div>
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>回收信息修改</h5>
                </div>
                <div class="ibox-content">
                    <form class="form-horizontal" id="form1">
                        <!--`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',-->
                        <input type="hidden" name="id" value="{$apply.id}" class="form-control">
                        <input type="hidden" name="pid" value="{$pid}" class="form-control">

                        <!--姓名-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label">姓名：</label>
                            <div class="col-sm-6">
                                <input type="text" readonly placeholder="请输入报名人姓名" id="name" value="{$data.name}" class="form-control">
                            </div>
                            <div class='col-sm-4'></div>
                        </div>

                        <!--负责老师-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label">负责老师：</label>
                            <div class="col-sm-6">
                                <input type="text" placeholder="请输入负责老师姓名" id="teacher" name="teacher" value="{$data.teacher}" class="form-control">
                            </div>
                            <div class='col-sm-4'></div>
                        </div>
                        <!--负责老师-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label">备注：</label>
                            <div class="col-sm-6">
                                <input type="text" placeholder="请输入备注信息" id="comment" name="teacher" value="{$data.comment" class="form-control">
                            </div>
                            <div class='col-sm-4'></div>
                        </div>
                        <!--确认-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label"></label>
                            <div class="col-sm-6">
                                <button type="button" class="btn btn-info btn-sm btn-block" id="save"> 保存修改</button>
                            </div>
                            <div class='col-sm-4'></div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 全局js -->
<script src="/public/static/admin/layui/layui.js"></script>
<script src="/public/static/admin/js/jquery.min.js?v=2.1.4"></script>
<script src="/public/static/admin/js/bootstrap.min.js?v=3.3.6"></script>
<!-- 自定义js -->
<script src="/public/static/admin/js/plugins/iCheck/icheck.min.js"></script>
<script src="/public/static/admin/js/content.js?v=1.0.0"></script>
<script src="/public/static/admin/js/plugins/prettyfile/bootstrap-prettyfile.js"></script>
<script src="/public/static/home/script/distpicker.data.js"></script>
<script src="/public/static/home/script/distpicker.js"></script>
<script src="/public/static/home/script/main.js"></script>


<script>
    //单选和复选框
    $(document).ready(function () {
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
    });
    //初始化学员的专业
    $("#major option[value={$apply['major']}]").prop("selected",true)
    $("#major2 option[value={$apply['major2']}]").prop("selected",true)


    layui.use('upload', function() { //独立版的layer无需执行这一句
        var $ = layui.jquery, layer = layui.layer,upload = layui.upload; //独立版的layer无需执行这一句
        //获取性别
        $("#save").click(function () {
            var form1  = $("#form1").serializeArray();
            data = {}
            form1.forEach(function(val){
                data[val.name] = val.value;
                console.log(data);
            })
            console.log(data);
            $.post("{:url('Dustbins/toUpdate')}", data, function (data) {
                top.layer.msg(data.msg, {time: 2000,shade:0.5}, function () {
                    if (data.url) {
                        window.location.href = data.url;
                    }
                });
            });
        });
    });

    $(".check").click(function(){
        if($(this).attr('class') == "fa fa-square-o check"){
            $(this).attr('class',"fa fa-check-square-o check");
        }else{
            $(this).attr('class',"fa fa-square-o check");
        }
    });
</script>
<!-- SUMMERNOTE -->
<script src="/public/static/admin/js/plugins/summernote/summernote.min.js"></script>
<script src="/public/static/admin/js/plugins/summernote/summernote-zh-CN.js"></script>
<script>


    $(document).ready(function () {

        $('.summernote').summernote({
            lang: 'zh-CN'
        });

    });
</script>

</body>
</html>
